package com.hxkj.controller.taglib;

import com.alibaba.fastjson.JSONObject;
import com.hxkj.domain.po.FreeMarker;
import com.hxkj.service.taglib.AnalyzeColumnService;
import com.integral.mall.file.po.SysFile;
import com.platform.common.domain.result.ResultDataStruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.concurrent.Callable;

/**
 * @ClassName AnalyzeColumnController
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/7/20 16:52
 * @Version 1.0
 */
@RestController
@RequestMapping("/analyzeColumn")
public class AnalyzeColumnController {

    @Autowired
    private AnalyzeColumnService analyzeColumnService;

    /**
     * @author Mr.zheng
     * @Description analyzeColumn 自定义标签解析文章分类
     **/
    @RequestMapping(value = "/column")
    public Callable<JSONObject> analyzeColumn(@ModelAttribute FreeMarker freeMarker) throws Exception{
        return () ->  analyzeColumnService.analyzeColumn(freeMarker);
    }
}
